<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>试题列表 - 试题库管理系统</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    
    <!-- Tailwind 配置 -->
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#165DFF',
                        secondary: '#36CBCB',
                        accent: '#FF7D00',
                        success: '#00B42A',
                        warning: '#FF7D00',
                        danger: '#F53F3F',
                    },
                    fontFamily: {
                        inter: ['Inter', 'system-ui', 'sans-serif'],
                    },
                }
            }
        }
    </script>
    
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .scrollbar-hide {
                -ms-overflow-style: none;
                scrollbar-width: none;
            }
            .scrollbar-hide::-webkit-scrollbar {
                display: none;
            }
            .question-card-hover {
                @apply transition-all duration-300 hover:shadow-md hover:border-primary/30;
            }
            .fade-in {
                animation: fadeIn 0.5s ease-in-out;
            }
            @keyframes fadeIn {
                from { opacity: 0; transform: translateY(10px); }
                to { opacity: 1; transform: translateY(0); }
            }
        }
    </style>
</head>
<body class="bg-gray-50 font-inter text-gray-800 min-h-screen flex flex-col">
    <!-- 顶部导航栏 -->
    <header class="bg-white shadow-sm sticky top-0 z-50 transition-all duration-300">
        <div class="container mx-auto px-4 py-3 flex items-center justify-between">
            <div class="flex items-center space-x-2">
                <button id="sidebar-toggle" class="lg:hidden text-gray-500 hover:text-primary transition-colors">
                    <i class="fa fa-bars text-xl"></i>
                </button>
                <h1 class="text-xl font-bold text-primary flex items-center">
                    <i class="fa fa-book mr-2"></i>
                    <span>试题库管理系统</span>
                </h1>
            </div>
            
            <div class="hidden md:flex items-center space-x-6">
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">首页</a>
                <a href="#" class="text-primary font-medium border-b-2 border-primary pb-1">题库</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">教材版本</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">统计分析</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">系统设置</a>
            </div>
            
            <div class="flex items-center space-x-4">
                <div class="relative">
                    <input type="text" placeholder="搜索试题、知识点..." 
                           class="pl-10 pr-4 py-2 rounded-full bg-gray-100 focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all w-40 lg:w-64">
                    <i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
                </div>
                
                <div class="relative">
                    <button class="text-gray-500 hover:text-primary transition-colors">
                        <i class="fa fa-bell text-xl"></i>
                        <span class="absolute -top-1 -right-1 bg-danger text-white text-xs rounded-full h-4 w-4 flex items-center justify-center">3</span>
                    </button>
                </div>
                
                <div class="flex items-center space-x-2 cursor-pointer group">
                    <img src="https://picsum.photos/id/64/40/40" alt="用户头像" class="w-8 h-8 rounded-full object-cover border-2 border-transparent group-hover:border-primary transition-all">
                    <span class="hidden md:inline font-medium">张老师</span>
                    <i class="fa fa-angle-down text-gray-400 group-hover:text-primary transition-colors"></i>
                </div>
            </div>
        </div>
    </header>

    <div class="flex flex-1 overflow-hidden">
        <!-- 左侧边栏 - 知识点导航 -->
        <aside id="sidebar" class="w-64 bg-white shadow-md transform -translate-x-full lg:translate-x-0 fixed lg:static h-full z-40 transition-transform duration-300 ease-in-out overflow-y-auto scrollbar-hide">
            <div class="p-4 border-b">
                <div class="flex items-center justify-between mb-3">
                    <h2 class="font-bold text-lg">知识点导航</h2>
                    <div class="relative">
                        <select class="appearance-none bg-gray-100 rounded-lg px-3 py-1 pr-8 focus:outline-none focus:ring-1 focus:ring-primary">
                            <option>全部学科</option>
                            <option selected>数学</option>
                            <option>物理</option>
                            <option>化学</option>
                            <option>生物</option>
                        </select>
                        <i class="fa fa-chevron-down absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 pointer-events-none"></i>
                    </div>
                </div>
                
                <div class="relative">
                    <input type="text" placeholder="搜索知识点..." 
                           class="w-full pl-8 pr-4 py-2 rounded-lg bg-gray-100 focus:outline-none focus:ring-1 focus:ring-primary">
                    <i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
                </div>
            </div>
            
            <!-- 教材版本选择 -->
            <div class="p-4 border-b">
                <h3 class="font-medium text-sm text-gray-500 mb-2">选择教材版本</h3>
                <div class="space-y-2">
                    <div class="relative">
                        <select class="w-full appearance-none bg-gray-100 rounded-lg px-3 py-2 pr-8 focus:outline-none focus:ring-1 focus:ring-primary">
                            <option selected>人教版 2023版</option>
                            <option>苏教版 2022版</option>
                            <option>北师大版 2023版</option>
                            <option>沪科版 2024版</option>
                        </select>
                        <i class="fa fa-chevron-down absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 pointer-events-none"></i>
                    </div>
                </div>
            </div>
            
            <!-- 知识点树形导航 -->
            <div class="p-4">
                <div class="flex items-center justify-between mb-3">
                    <h3 class="font-medium text-sm text-gray-500">知识点结构</h3>
                    <div class="flex space-x-1">
                        <button id="expand-all" class="text-xs text-gray-500 hover:text-primary">展开</button>
                        <span class="text-gray-300">|</span>
                        <button id="collapse-all" class="text-xs text-gray-500 hover:text-primary">收起</button>
                    </div>
                </div>
                
                <div class="space-y-1">
                    <!-- 章节1 -->
                    <div class="chapter-item">
                        <div class="flex items-center justify-between cursor-pointer hover:bg-gray-50 rounded-lg p-2 transition-colors">
                            <div class="flex items-center">
                                <i class="fa fa-book text-primary mr-2"></i>
                                <span class="font-medium">第一章 集合与常用逻辑用语</span>
                            </div>
                            <i class="fa fa-angle-down text-gray-400 transition-transform"></i>
                        </div>
                        
                        <div class="pl-6 mt-1 space-y-1">
                            <div class="section-item">
                                <div class="flex items-center justify-between cursor-pointer hover:bg-gray-50 rounded-lg p-2 transition-colors">
                                    <div class="flex items-center">
                                        <i class="fa fa-bookmark-o text-secondary mr-2"></i>
                                        <span>1.1 集合的含义与表示</span>
                                    </div>
                                    <span class="text-xs bg-blue-100 text-blue-600 px-2 py-0.5 rounded-full">32题</span>
                                </div>
                                
                                <div class="pl-6 mt-1 space-y-1">
                                    <div class="knowledge-item bg-primary/5 border-l-2 border-primary p-2 rounded-r-lg cursor-pointer hover:bg-primary/10 transition-colors">
                                        <div class="flex items-center justify-between">
                                            <div class="flex items-center">
                                                <i class="fa fa-dot-circle-o text-primary mr-2"></i>
                                                <span>集合的定义</span>
                                            </div>
                                            <span class="text-xs text-gray-500">3题</span>
                                        </div>
                                    </div>
                                    
                                    <div class="knowledge-item hover:bg-gray-50 p-2 rounded-lg cursor-pointer transition-colors">
                                        <div class="flex items-center justify-between">
                                            <div class="flex items-center">
                                                <i class="fa fa-dot-circle-o text-gray-400 mr-2"></i>
                                                <span>集合的表示方法</span>
                                            </div>
                                            <span class="text-xs text-gray-500">5题</span>
                                        </div>
                                    </div>
                                    
                                    <div class="knowledge-item hover:bg-gray-50 p-2 rounded-lg cursor-pointer transition-colors">
                                        <div class="flex items-center justify-between">
                                            <div class="flex items-center">
                                                <i class="fa fa-dot-circle-o text-gray-400 mr-2"></i>
                                                <span>元素与集合的关系</span>
                                            </div>
                                            <span class="text-xs text-gray-500">4题</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                            <div class="section-item">
                                <div class="flex items-center justify-between cursor-pointer hover:bg-gray-50 rounded-lg p-2 transition-colors">
                                    <div class="flex items-center">
                                        <i class="fa fa-bookmark-o text-secondary mr-2"></i>
                                        <span>1.2 集合间的基本关系</span>
                                    </div>
                                    <span class="text-xs bg-blue-100 text-blue-600 px-2 py-0.5 rounded-full">24题</span>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 章节2 -->
                    <div class="chapter-item">
                        <div class="flex items-center justify-between cursor-pointer hover:bg-gray-50 rounded-lg p-2 transition-colors">
                            <div class="flex items-center">
                                <i class="fa fa-book text-primary mr-2"></i>
                                <span>第二章 一元二次函数、方程和不等式</span>
                            </div>
                            <i class="fa fa-angle-right text-gray-400 transition-transform"></i>
                        </div>
                    </div>
                    
                    <!-- 章节3 -->
                    <div class="chapter-item">
                        <div class="flex items-center justify-between cursor-pointer hover:bg-gray-50 rounded-lg p-2 transition-colors">
                            <div class="flex items-center">
                                <i class="fa fa-book text-primary mr-2"></i>
                                <span>第三章 函数概念与性质</span>
                            </div>
                            <i class="fa fa-angle-right text-gray-400 transition-transform"></i>
                        </div>
                    </div>
                    
                    <!-- 章节4 -->
                    <div class="chapter-item">
                        <div class="flex items-center justify-between cursor-pointer hover:bg-gray-50 rounded-lg p-2 transition-colors">
                            <div class="flex items-center">
                                <i class="fa fa-book text-primary mr-2"></i>
                                <span>第四章 指数函数与对数函数</span>
                            </div>
                            <i class="fa fa-angle-right text-gray-400 transition-transform"></i>
                        </div>
                    </div>
                </div>
            </div>
        </aside>
        
        <!-- 主内容区 -->
        <main class="flex-1 overflow-y-auto bg-gray-50 p-4 lg:p-6">
            <div class="container mx-auto">
                <!-- 面包屑导航 -->
                <div class="flex items-center text-sm text-gray-500 mb-4">
                    <a href="#" class="hover:text-primary">首页</a>
                    <i class="fa fa-angle-right mx-2 text-gray-300"></i>
                    <a href="#" class="hover:text-primary">题库</a>
                    <i class="fa fa-angle-right mx-2 text-gray-300"></i>
                    <a href="#" class="hover:text-primary">数学题库</a>
                    <i class="fa fa-angle-right mx-2 text-gray-300"></i>
                    <span class="text-primary font-medium">集合的定义</span>
                </div>
                
                <!-- 内容标题区 -->
                <div class="flex flex-col md:flex-row md:items-center justify-between mb-6">
                    <div>
                        <h2 class="text-[clamp(1.5rem,3vw,2rem)] font-bold text-gray-800">集合的定义 - 试题列表</h2>
                        <p class="text-gray-500 mt-1">共3道试题，包含选择题、填空题和解答题</p>
                    </div>
                    
                    <div class="flex space-x-3 mt-4 md:mt-0">
                        <button id="batch-operation-btn" class="bg-white border border-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-50 transition-colors flex items-center">
                            <i class="fa fa-cog mr-2"></i> 批量操作
                        </button>
                        <button id="import-questions-btn" class="bg-gray-100 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-200 transition-colors flex items-center">
                            <i class="fa fa-upload mr-2"></i> 批量导入
                        </button>
                        <button id="add-question-btn" class="bg-primary text-white px-4 py-2 rounded-lg hover:bg-primary/90 transition-colors flex items-center">
                            <i class="fa fa-plus mr-2"></i> 添加试题
                        </button>
                    </div>
                </div>
                
                <!-- 筛选和搜索区 -->
                <div class="bg-white rounded-xl shadow-sm p-4 mb-6 fade-in">
                    <div class="grid grid-cols-1 md:grid-cols-4 gap-4">
                        <div>
                            <label class="block text-sm font-medium text-gray-700 mb-1">题型</label>
                            <select class="w-full appearance-none bg-gray-50 border border-gray-200 rounded-lg px-3 py-2 pr-8 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary">
                                <option value="">全部题型</option>
                                <option value="single">单选题</option>
                                <option value="multiple">多选题</option>
                                <option value="fill">填空题</option>
                                <option value="answer">解答题</option>
                            </select>
                        </div>
                        <div>
                            <label class="block text-sm font-medium text-gray-700 mb-1">难度</label>
                            <select class="w-full appearance-none bg-gray-50 border border-gray-200 rounded-lg px-3 py-2 pr-8 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary">
                                <option value="">全部难度</option>
                                <option value="easy">简单</option>
                                <option value="medium">中等</option>
                                <option value="hard">困难</option>
                            </select>
                        </div>
                        <div>
                            <label class="block text-sm font-medium text-gray-700 mb-1">来源</label>
                            <select class="w-full appearance-none bg-gray-50 border border-gray-200 rounded-lg px-3 py-2 pr-8 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary">
                                <option value="">全部来源</option>
                                <option value="system">系统题库</option>
                                <option value="custom">自定义</option>
                                <option value="imported">导入试题</option>
                            </select>
                        </div>
                        <div class="flex items-end">
                            <button class="w-full bg-primary text-white px-4 py-2 rounded-lg hover:bg-primary/90 transition-colors">
                                <i class="fa fa-filter mr-1"></i> 筛选
                            </button>
                        </div>
                    </div>
                </div>
                
                <!-- 试题列表 -->
                <div class="space-y-4 mb-6">
                    <!-- 试题1：单选题 -->
                    <div class="bg-white rounded-xl shadow-sm border border-gray-100 p-5 question-card-hover fade-in">
                        <div class="flex items-start justify-between mb-3">
                            <div class="flex items-center">
                                <span class="inline-block px-2 py-1 text-xs font-medium bg-blue-100 text-blue-800 rounded mr-2">单选题</span>
                                <span class="inline-block px-2 py-1 text-xs font-medium bg-yellow-100 text-yellow-800 rounded">简单</span>
                            </div>
                            <div class="flex space-x-2">
                                <button class="text-gray-500 hover:text-primary transition-colors" title="编辑">
                                    <i class="fa fa-pencil"></i>
                                </button>
                                <button class="text-gray-500 hover:text-danger transition-colors" title="删除">
                                    <i class="fa fa-trash"></i>
                                </button>
                                <button class="text-gray-500 hover:text-secondary transition-colors" title="复制">
                                    <i class="fa fa-copy"></i>
                                </button>
                            </div>
                        </div>
                        
                        <div class="mb-4">
                            <h3 class="font-medium text-gray-800 mb-3">1. 下列各组对象中，能构成集合的是（）</h3>
                            
                            <div class="ml-4 space-y-2">
                                <div class="flex items-center">
                                    <span class="inline-block w-6 h-6 rounded-full border border-gray-300 flex items-center justify-center mr-2">A</span>
                                    <span>所有很大的数</span>
                                </div>
                                <div class="flex items-center">
                                    <span class="inline-block w-6 h-6 rounded-full border border-gray-300 flex items-center justify-center mr-2">B</span>
                                    <span>接近于0的数</span>
                                </div>
                                <div class="flex items-center">
                                    <span class="inline-block w-6 h-6 rounded-full border border-gray-300 flex items-center justify-center mr-2">C</span>
                                    <span>所有的正整数</span>
                                </div>
                                <div class="flex items-center">
                                    <span class="inline-block w-6 h-6 rounded-full border border-gray-300 flex items-center justify-center mr-2">D</span>
                                    <span>身材较高的人</span>
                                </div>
                            </div>
                        </div>
                        
                        <div class="flex items-center justify-between text-sm text-gray-500">
                            <div>
                                <span class="mr-4"><i class="fa fa-eye mr-1"></i> 128</span>
                                <span><i class="fa fa-calendar mr-1"></i> 2023-09-15</span>
                            </div>
                            <div>
                                <span class="mr-4"><i class="fa fa-user mr-1"></i> 系统管理员</span>
                                <span><i class="fa fa-check-circle text-success mr-1"></i> 已审核</span>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 试题2：填空题 -->
                    <div class="bg-white rounded-xl shadow-sm border border-gray-100 p-5 question-card-hover fade-in" style="animation-delay: 0.1s;">
                        <div class="flex items-start justify-between mb-3">
                            <div class="flex items-center">
                                <span class="inline-block px-2 py-1 text-xs font-medium bg-purple-100 text-purple-800 rounded mr-2">填空题</span>
                                <span class="inline-block px-2 py-1 text-xs font-medium bg-yellow-100 text-yellow-800 rounded">简单</span>
                            </div>
                            <div class="flex space-x-2">
                                <button class="text-gray-500 hover:text-primary transition-colors" title="编辑">
                                    <i class="fa fa-pencil"></i>
                                </button>
                                <button class="text-gray-500 hover:text-danger transition-colors" title="删除">
                                    <i class="fa fa-trash"></i>
                                </button>
                                <button class="text-gray-500 hover:text-secondary transition-colors" title="复制">
                                    <i class="fa fa-copy"></i>
                                </button>
                            </div>
                        </div>
                        
                        <div class="mb-4">
                            <h3 class="font-medium text-gray-800 mb-3">2. 集合{1, 2, 3}的子集个数是__________。</h3>
                        </div>
                        
                        <div class="flex items-center justify-between text-sm text-gray-500">
                            <div>
                                <span class="mr-4"><i class="fa fa-eye mr-1"></i> 96</span>
                                <span><i class="fa fa-calendar mr-1"></i> 2023-09-18</span>
                            </div>
                            <div>
                                <span class="mr-4"><i class="fa fa-user mr-1"></i> 李老师</span>
                                <span><i class="fa fa-check-circle text-success mr-1"></i> 已审核</span>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 试题3：解答题 -->
                    <div class="bg-white rounded-xl shadow-sm border border-gray-100 p-5 question-card-hover fade-in" style="animation-delay: 0.2s;">
                        <div class="flex items-start justify-between mb-3">
                            <div class="flex items-center">
                                <span class="inline-block px-2 py-1 text-xs font-medium bg-green-100 text-green-800 rounded mr-2">解答题</span>
                                <span class="inline-block px-2 py-1 text-xs font-medium bg-orange-100 text-orange-800 rounded">中等</span>
                            </div>
                            <div class="flex space-x-2">
                                <button class="text-gray-500 hover:text-primary transition-colors" title="编辑">
                                    <i class="fa fa-pencil"></i>
                                </button>
                                <button class="text-gray-500 hover:text-danger transition-colors" title="删除">
                                    <i class="fa fa-trash"></i>
                                </button>
                                <button class="text-gray-500 hover:text-secondary transition-colors" title="复制">
                                    <i class="fa fa-copy"></i>
                                </button>
                            </div>
                        </div>
                        
                        <div class="mb-4">
                            <h3 class="font-medium text-gray-800 mb-3">3. 已知集合A={x | x² - 3x + 2 = 0}，集合B={x | x² - ax + a - 1 = 0}，若B⊆A，求实数a的取值范围。</h3>
                            
                            <div class="mt-4 p-3 bg-gray-50 rounded-lg border border-gray-200">
                                <h4 class="font-medium text-gray-700 mb-2">参考答案：</h4>
                                <p class="text-gray-600 text-sm">
                                    解：由x² - 3x + 2 = 0解得x = 1或x = 2，因此A = {1, 2}。<br><br>
                                    对于方程x² - ax + a - 1 = 0，其判别式Δ = a² - 4(a - 1) = (a - 2)² ≥ 0，方程有解。<br><br>
                                    解方程得x = 1或x = a - 1，因此B = {1, a - 1}。<br><br>
                                    因为B⊆A，所以a - 1 = 1或a - 1 = 2，解得a = 2或a = 3。<br><br>
                                    当a = 2时，B = {1}，满足B⊆A；当a = 3时，B = {1, 2}，也满足B⊆A。<br><br>
                                    综上所述，实数a的取值范围是{2, 3}。
                                </p>
                            </div>
                        </div>
                        
                        <div class="flex items-center justify-between text-sm text-gray-500">
                            <div>
                                <span class="mr-4"><i class="fa fa-eye mr-1"></i> 75</span>
                                <span><i class="fa fa-calendar mr-1"></i> 2023-09-20</span>
                            </div>
                            <div>
                                <span class="mr-4"><i class="fa fa-user mr-1"></i> 王老师</span>
                                <span><i class="fa fa-check-circle text-success mr-1"></i> 已审核</span>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 更多试题可以在这里继续添加 -->
                </div>
                
                <!-- 分页控件 -->
                <div class="flex items-center justify-between bg-white rounded-xl shadow-sm p-4">
                    <div class="text-sm text-gray-500">
                        显示 <span class="font-medium">1-3</span> 条，共 <span class="font-medium">3</span> 条
                    </div>
                    
                    <div class="flex space-x-1">
                        <button class="w-9 h-9 flex items-center justify-center rounded-lg border border-gray-200 text-gray-400 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed" disabled>
                            <i class="fa fa-angle-left"></i>
                        </button>
                        <button class="w-9 h-9 flex items-center justify-center rounded-lg bg-primary text-white">1</button>
                        <button class="w-9 h-9 flex items-center justify-center rounded-lg border border-gray-200 text-gray-700 hover:bg-gray-50">
                            <i class="fa fa-angle-right"></i>
                        </button>
                    </div>
                </div>
            </div>
        </main>
    </div>
    
    <!-- 添加试题模态框 -->
    <div id="add-question-modal" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden flex items-center justify-center">
        <div class="bg-white rounded-xl shadow-lg w-full max-w-4xl max-h-[90vh] overflow-y-auto transform transition-all duration-300 scale-95 opacity-0" id="modal-content">
            <div class="p-6 border-b">
                <div class="flex items-center justify-between">
                    <h3 class="text-xl font-bold text-gray-800">添加试题</h3>
                    <button id="close-modal" class="text-gray-400 hover:text-gray-600">
                        <i class="fa fa-times text-xl"></i>
                    </button>
                </div>
            </div>
            
            <div class="p-6">
                <form id="question-form">
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
                        <div>
                            <label class="block text-sm font-medium text-gray-700 mb-1">学科</label>
                            <select class="w-full appearance-none bg-gray-50 border border-gray-200 rounded-lg px-3 py-2 pr-8 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary">
                                <option>数学</option>
                                <option>物理</option>
                                <option>化学</option>
                                <option>生物</option>
                                <option>语文</option>
                                <option>英语</option>
                            </select>
                        </div>
                        
                        <div>
                            <label class="block text-sm font-medium text-gray-700 mb-1">教材版本</label>
                            <select class="w-full appearance-none bg-gray-50 border border-gray-200 rounded-lg px-3 py-2 pr-8 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary">
                                <option>人教版 2023版</option>
                                <option>苏教版 2022版</option>
                                <option>北师大版 2023版</option>
                                <option>沪科版 2024版</option>
                            </select>
                        </div>
                        
                        <div>
                            <label class="block text-sm font-medium text-gray-700 mb-1">章节</label>
                            <select class="w-full appearance-none bg-gray-50 border border-gray-200 rounded-lg px-3 py-2 pr-8 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary">
                                <option>第一章 集合与常用逻辑用语</option>
                                <option>第二章 一元二次函数、方程和不等式</option>
                                <option>第三章 函数概念与性质</option>
                                <option>第四章 指数函数与对数函数</option>
                            </select>
                        </div>
                        
                        <div>
                            <label class="block text-sm font-medium text-gray-700 mb-1">知识点</label>
                            <select class="w-full appearance-none bg-gray-50 border border-gray-200 rounded-lg px-3 py-2 pr-8 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary">
                                <option>集合的定义</option>
                                <option>集合的表示方法</option>
                                <option>元素与集合的关系</option>
                                <option>集合间的基本关系</option>
                                <option>集合的运算</option>
                            </select>
                        </div>
                        
                        <div>
                            <label class="block text-sm font-medium text-gray-700 mb-1">题型</label>
                            <select class="w-full appearance-none bg-gray-50 border border-gray-200 rounded-lg px-3 py-2 pr-8 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary">
                                <option>单选题</option>
                                <option>多选题</option>
                                <option>判断题</option>
                                <option>填空题</option>
                                <option>解答题</option>
                                <option>证明题</option>
                            </select>
                        </div>
                        
                        <div>
                            <label class="block text-sm font-medium text-gray-700 mb-1">难度</label>
                            <select class="w-full appearance-none bg-gray-50 border border-gray-200 rounded-lg px-3 py-2 pr-8 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary">
                                <option>简单</option>
                                <option>中等</option>
                                <option>困难</option>
                            </select>
                        </div>
                    </div>
                    
                    <div class="mb-6">
                        <label class="block text-sm font-medium text-gray-700 mb-1">题干</label>
                        <textarea class="w-full p-3 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary min-h-[100px]" placeholder="请输入试题题干..."></textarea>
                    </div>
                    
                    <div class="mb-6" id="options-container">
                        <label class="block text-sm font-medium text-gray-700 mb-3">选项</label>
                        
                        <div class="space-y-3">
                            <div class="flex items-center">
                                <span class="inline-block w-6 h-6 rounded-full bg-gray-100 flex items-center justify-center mr-2">A</span>
                                







                                <input type="text" class="flex-1 p-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary" placeholder="请输入选项内容...">
                            </div>
                            
                            <div class="flex items-center">
                                <span class="inline-block w-6 h-6 rounded-full bg-gray-100 flex items-center justify-center mr-2">B</span>
                                <input type="text" class="flex-1 p-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary" placeholder="请输入选项内容...">
                            </div>
                            
                            <div class="flex items-center">
                                <span class="inline-block w-6 h-6 rounded-full bg-gray-100 flex items-center justify-center mr-2">C</span>
                                <input type="text" class="flex-1 p-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary" placeholder="请输入选项内容...">
                            </div>
                            
                            <div class="flex items-center">
                                <span class="inline-block w-6 h-6 rounded-full bg-gray-100 flex items-center justify-center mr-2">D</span>
                                <input type="text" class="flex-1 p-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary" placeholder="请输入选项内容...">
                            </div>
                        </div>
                        
                        <div class="mt-3 flex justify-between">
                            <button type="button" class="text-sm text-primary hover:text-primary/80 transition-colors flex items-center">
                                <i class="fa fa-plus-circle mr-1"></i> 添加选项
                            </button>
                            <button type="button" class="text-sm text-gray-500 hover:text-gray-700 transition-colors flex items-center">
                                <i class="fa fa-minus-circle mr-1"></i> 减少选项
                            </button>
                        </div>
                    </div>
                    
                    <div class="mb-6">
                        <label class="block text-sm font-medium text-gray-700 mb-1">参考答案</label>
                        <div class="flex items-center">
                            <select class="w-full appearance-none bg-gray-50 border border-gray-200 rounded-lg px-3 py-2 pr-8 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary">
                                <option>A</option>
                                <option>B</option>
                                <option>C</option>
                                <option>D</option>
                            </select>
                        </div>
                    </div>
                    
                    <div class="mb-6">
                        <label class="block text-sm font-medium text-gray-700 mb-1">解析</label>
                        <textarea class="w-full p-3 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary min-h-[80px]" placeholder="请输入试题解析（可选）..."></textarea>
                    </div>
                    
                    <div class="mb-6">
                        <label class="block text-sm font-medium text-gray-700 mb-1">备注</label>
                        <input type="text" class="w-full p-3 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary" placeholder="请输入备注信息（可选）...">
                    </div>
                </form>
            </div>
            
            <div class="p-6 border-t flex justify-end space-x-3">
                <button id="cancel-add-question" class="px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 transition-colors">
                    取消
                </button>
                <button id="save-question" class="px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors">
                    保存试题
                </button>
            </div>
        </div>
    </div>
    
    <!-- 批量操作模态框 -->
    <div id="batch-operation-modal" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden flex items-center justify-center">
        <div class="bg-white rounded-xl shadow-lg w-full max-w-md transform transition-all duration-300 scale-95 opacity-0" id="batch-modal-content">
            <div class="p-6 border-b">
                <div class="flex items-center justify-between">
                    <h3 class="text-xl font-bold text-gray-800">批量操作</h3>
                    <button id="close-batch-modal" class="text-gray-400 hover:text-gray-600">
                        <i class="fa fa-times text-xl"></i>
                    </button>
                </div>
            </div>
            
            <div class="p-6">
                <div class="space-y-4">
                    <div class="flex items-center p-3 border border-gray-200 rounded-lg cursor-pointer hover:bg-gray-50 transition-colors">
                        <i class="fa fa-move text-gray-400 mr-3"></i>
                        <span>批量移动到其他知识点</span>
                    </div>
                    
                    <div class="flex items-center p-3 border border-gray-200 rounded-lg cursor-pointer hover:bg-gray-50 transition-colors">
                        <i class="fa fa-trash text-gray-400 mr-3"></i>
                        <span>批量删除选中试题</span>
                    </div>
                    
                    <div class="flex items-center p-3 border border-gray-200 rounded-lg cursor-pointer hover:bg-gray-50 transition-colors">
                        <i class="fa fa-download text-gray-400 mr-3"></i>
                        <span>批量导出选中试题</span>
                    </div>
                    
                    <div class="flex items-center p-3 border border-gray-200 rounded-lg cursor-pointer hover:bg-gray-50 transition-colors">
                        <i class="fa fa-edit text-gray-400 mr-3"></i>
                        <span>批量修改试题属性</span>
                    </div>
                </div>
            </div>
            
            <div class="p-6 border-t flex justify-end">
                <button id="cancel-batch-operation" class="px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 transition-colors">
                    关闭
                </button>
            </div>
        </div>
    </div>
    
    <!-- 导入试题模态框 -->
    <div id="import-modal" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden flex items-center justify-center">
        <div class="bg-white rounded-xl shadow-lg w-full max-w-md transform transition-all duration-300 scale-95 opacity-0" id="import-modal-content">
            <div class="p-6 border-b">
                <div class="flex items-center justify-between">
                    <h3 class="text-xl font-bold text-gray-800">批量导入试题</h3>
                    <button id="close-import-modal" class="text-gray-400 hover:text-gray-600">
                        <i class="fa fa-times text-xl"></i>
                    </button>
                </div>
            </div>
            
            <div class="p-6">
                <div class="border-2 border-dashed border-gray-300 rounded-lg p-8 text-center">
                    <i class="fa fa-cloud-upload text-4xl text-gray-400 mb-3"></i>
                    <p class="text-gray-600 mb-4">拖拽文件到此处或点击上传</p>
                    <button class="bg-primary text-white px-4 py-2 rounded-lg hover:bg-primary/90 transition-colors">
                        选择文件
                    </button>
                    <p class="text-xs text-gray-500 mt-4">支持格式：.docx, .xlsx, .json<br>单个文件不超过10MB</p>
                </div>
                
                <div class="mt-6">
                    <h4 class="text-sm font-medium text-gray-700 mb-3">下载模板</h4>
                    <div class="flex space-x-3">
                        <a href="#" class="flex-1 flex items-center justify-center p-3 border border-gray-200 rounded-lg text-gray-700 hover:bg-gray-50 transition-colors">
                            <i class="fa fa-file-word-o text-blue-500 mr-2"></i>
                            <span>Word模板</span>
                        </a>
                        <a href="#" class="flex-1 flex items-center justify-center p-3 border border-gray-200 rounded-lg text-gray-700 hover:bg-gray-50 transition-colors">
                            <i class="fa fa-file-excel-o text-green-500 mr-2"></i>
                            <span>Excel模板</span>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <script>
        // 侧边栏切换
        document.getElementById('sidebar-toggle').addEventListener('click', function() {
            const sidebar = document.getElementById('sidebar');
            sidebar.classList.toggle('-translate-x-full');
        });
        
        // 章节展开/收起
        document.querySelectorAll('.chapter-item > div:first-child').forEach(item => {
            item.addEventListener('click', function() {
                const content = this.nextElementSibling;
                const icon = this.querySelector('.fa');
                
                if (content) {
                    content.classList.toggle('hidden');
                    if (icon.classList.contains('fa-angle-down')) {
                        icon.classList.replace('fa-angle-down', 'fa-angle-right');
                    } else {
                        icon.classList.replace('fa-angle-right', 'fa-angle-down');
                    }
                }
            });
        });
        
        // 展开/收起所有章节
        document.getElementById('expand-all').addEventListener('click', function() {
            document.querySelectorAll('.chapter-item > div:first-child').forEach(item => {
                const content = item.nextElementSibling;
                const icon = item.querySelector('.fa');
                
                if (content && content.classList.contains('hidden')) {
                    content.classList.remove('hidden');
                    if (icon.classList.contains('fa-angle-right')) {
                        icon.classList.replace('fa-angle-right', 'fa-angle-down');
                    }
                }
            });
        });
        
        document.getElementById('collapse-all').addEventListener('click', function() {
            document.querySelectorAll('.chapter-item > div:first-child').forEach(item => {
                const content = item.nextElementSibling;
                const icon = item.querySelector('.fa');
                
                if (content && !content.classList.contains('hidden')) {
                    content.classList.add('hidden');
                    if (icon.classList.contains('fa-angle-down')) {
                        icon.classList.replace('fa-angle-down', 'fa-angle-right');
                    }
                }
            });
        });
        
        // 模态框控制
        function showModal(modalId, contentId) {
            const modal = document.getElementById(modalId);
            const content = document.getElementById(contentId);
            
            modal.classList.remove('hidden');
            setTimeout(() => {
                content.classList.remove('scale-95', 'opacity-0');
                content.classList.add('scale-100', 'opacity-100');
            }, 10);
        }
        
        function hideModal(modalId, contentId) {
            const modal = document.getElementById(modalId);
            const content = document.getElementById(contentId);
            
            content.classList.remove('scale-100', 'opacity-100');
            content.classList.add('scale-95', 'opacity-0');
            setTimeout(() => {
                modal.classList.add('hidden');
            }, 300);
        }
        
        // 添加试题模态框
        document.getElementById('add-question-btn').addEventListener('click', () => {
            showModal('add-question-modal', 'modal-content');
        });
        
        document.getElementById('close-modal').addEventListener('click', () => {
            hideModal('add-question-modal', 'modal-content');
        });
        
        document.getElementById('cancel-add-question').addEventListener('click', () => {
            hideModal('add-question-modal', 'modal-content');
        });
        
        // 批量操作模态框
        document.getElementById('batch-operation-btn').addEventListener('click', () => {
            showModal('batch-operation-modal', 'batch-modal-content');
        });
        
        document.getElementById('close-batch-modal').addEventListener('click', () => {
            hideModal('batch-operation-modal', 'batch-modal-content');
        });
        
        document.getElementById('cancel-batch-operation').addEventListener('click', () => {
            hideModal('batch-operation-modal', 'batch-modal-content');
        });
        
        // 导入试题模态框
        document.getElementById('import-questions-btn').addEventListener('click', () => {
            showModal('import-modal', 'import-modal-content');
        });
        
        document.getElementById('close-import-modal').addEventListener('click', () => {
            hideModal('import-modal', 'import-modal-content');
        });
        
        // 保存试题
        document.getElementById('save-question').addEventListener('click', function() {
            // 这里添加表单验证和提交逻辑
            alert('试题保存成功！');
            hideModal('add-question-modal', 'modal-content');
        });
        
        // 页面滚动效果
        window.addEventListener('scroll', function() {
            const header = document.querySelector('header');
            if (window.scrollY > 10) {
                header.classList.add('shadow');
            } else {
                header.classList.remove('shadow');
            }
        });
    </script>
</body>
</html>